Skip to content

Add field type evaluation for form designer to ROADMAP_DESIGNER.md#536

Merged
hotlong merged 2 commits intomainfrom
copilot/evaluate-object-ui-fields
Feb 16, 2026
Merged

Add field type evaluation for form designer to ROADMAP_DESIGNER.md#536
hotlong merged 2 commits intomainfrom
copilot/evaluate-object-ui-fields

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 16, 2026

@object-ui/fields provides 36 field widgets but the designer components expose only a fraction of them. This adds a comprehensive evaluation (Section 10) to the design doc covering the gap and integration path.

Field Type Inventory (10.2)

  • Full catalog of all 36 field types across 8 categories (text, numeric, datetime, selection, contact, file, location, computed, complex)
  • Cross-referenced against type interfaces, cell renderers, form mappers, and current designer availability

Gap Analysis (10.3)

  • DataModelDesigner: No field type selector UI — new fields hardcoded to 'text', DataModelField.type is generic string not a union
  • PageDesigner: DEFAULT_PALETTE has 14 generic items (e.g. input, checkbox) instead of leveraging the 36 @object-ui/fields widgets
  • ViewDesigner: Plain text type badges, no icons/categorization

Proposed DESIGNER_FIELD_TYPES Constant (10.4)

Centralized field type registry with Lucide icons, categories, and descriptions for use across all designers:

export const DESIGNER_FIELD_TYPES: DesignerFieldTypeOption[] = [
  { type: 'text', label: 'Text', icon: Type, category: 'text', description: 'Single-line text input' },
  { type: 'currency', label: 'Currency', icon: Hash, category: 'number', description: 'Monetary value with currency symbol' },
  // ... all 36 types
];

Type Safety Recommendations (10.6)

  • Extract FieldTypeName from the FieldMetadata union discriminant
  • Update DataModelField.type from stringFieldTypeName
  • Complete mapFieldTypeToFormType for missing 9 types

Integration Plan & Phasing (10.5, 10.7)

Per-designer implementation points with P0–P3 prioritization, estimated at 7–9.5 dev-days total.

Original prompt

评估使用 npm @object-ui/fields 及相关包显示表单设计器的字段类型,更新设计器的设计文档。


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectui Ready Ready Preview, Comment Feb 16, 2026 3:27am
objectui-demo Ready Ready Preview, Comment Feb 16, 2026 3:27am
objectui-storybook Ready Ready Preview, Comment Feb 16, 2026 3:27am

Request Review

Evaluates @object-ui/fields field types for form designer integration.
Adds comprehensive Section 10 covering:
- Complete inventory of all 36 field widgets with type/renderer mapping
- Gap analysis per designer (DataModel, Page, View)
- Proposed DESIGNER_FIELD_TYPES constant
- Integration plan per designer component
- Type safety recommendations (FieldTypeName, DataModelField)
- Priority phasing with effort estimates

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Evaluate usage of npm @object-ui/fields for form designer Add field type evaluation for form designer to ROADMAP_DESIGNER.md Feb 16, 2026
Copilot AI requested a review from hotlong February 16, 2026 03:14
@hotlong hotlong marked this pull request as ready for review February 16, 2026 04:10
Copilot AI review requested due to automatic review settings February 16, 2026 04:10
@hotlong hotlong merged commit afab1e0 into main Feb 16, 2026
4 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a comprehensive Section 10 "Field Type Evaluation for Form Designer" to ROADMAP_DESIGNER.md, documenting the gap between available field widgets in @object-ui/fields (37 field types) and their limited exposure in designer UIs. The section provides a complete field type inventory, gap analysis for each designer component, and a detailed integration plan with prioritized implementation tasks.

Changes:

  • Complete catalog of all field types with their widget files, type interfaces, cell renderers, and current designer availability across 9 categories
  • Gap analysis identifying missing field type selectors in DataModelDesigner, limited palette in PageDesigner (14 vs 37 types), and plain text badges in ViewDesigner
  • Proposed DESIGNER_FIELD_TYPES constant with Lucide icons, categories, and descriptions for centralized field type registry
  • Type safety recommendations including FieldTypeName extraction and DataModelField.type strengthening
  • Phased implementation plan with 7-9.5 dev-days effort estimate

Comment thread ROADMAP_DESIGNER.md

#### DataModelDesigner

**Current state:** When a field is added via `handleAddField` (`DataModelDesigner.tsx:258`),
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reference to line 258 is slightly inaccurate. The actual line where the type is hardcoded to 'text' is line 260 in DataModelDesigner.tsx. Please update the line reference from 258 to 260.

Suggested change
**Current state:** When a field is added via `handleAddField` (`DataModelDesigner.tsx:258`),
**Current state:** When a field is added via `handleAddField` (`DataModelDesigner.tsx:260`),

Copilot uses AI. Check for mistakes.
Comment thread ROADMAP_DESIGNER.md
Comment on lines +854 to +856
3. **Update `mapFieldTypeToFormType` in `@object-ui/fields`** to cover all 36
field types (currently missing: `color`, `slider`, `rating`, `code`, `avatar`,
`address`, `geolocation`, `signature`, `qrcode`).
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list of missing field types in mapFieldTypeToFormType is incomplete. Based on the code in @object-ui/fields/src/index.tsx (lines 583-629), the function currently maps 24 out of 37 field types. The missing types are: user, object, vector, grid, color, slider, rating, code, avatar, address, geolocation, signature, and qrcode (13 types total, not 9). Please update the list to include all missing types or clarify which subset is considered priority.

Copilot uses AI. Check for mistakes.
Comment thread ROADMAP_DESIGNER.md
items: DESIGNER_FIELD_TYPES.map(ft => ({
type: `field:${ft.type}`,
label: ft.label,
icon: ft.icon.name,
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proposed palette addition code has a type mismatch. The code uses icon: ft.icon.name where ft.icon is a LucideIcon component type. However, DesignerPaletteItem.icon is typed as string (see @object-ui/types/designer.ts:118). LucideIcon components don't have a .name property that provides a string identifier. Consider one of these alternatives: (1) use the field type name as the icon identifier (icon: ft.type), (2) add a separate iconName field to DesignerFieldTypeOption, or (3) if you need the actual icon component, you'll need to change how palette items handle icons in the designer implementation.

Suggested change
icon: ft.icon.name,
icon: ft.type,

Copilot uses AI. Check for mistakes.
Comment thread ROADMAP_DESIGNER.md

### 10.1 Overview

The `@object-ui/fields` package provides **36 field widget implementations** covering
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The document states "36 field widget implementations" but the actual count from @object-ui/fields/src/widgets/ directory and the FieldMetadata union type in @object-ui/types/field-types.ts is 37 field types (including all types listed in the tables below). Please update this number to 37.

Suggested change
The `@object-ui/fields` package provides **36 field widget implementations** covering
The `@object-ui/fields` package provides **37 field widget implementations** covering

Copilot uses AI. Check for mistakes.
Comment thread ROADMAP_DESIGNER.md

The `@object-ui/fields` package provides **36 field widget implementations** covering
text, numeric, date/time, selection, file, contact, computed, and visual field types.
The `@object-ui/types` package defines **35 typed metadata interfaces** in
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The document states "35 typed metadata interfaces" but the FieldMetadata union type in @object-ui/types/field-types.ts actually contains 37 interface types (lines 570-607). Please update this number to 37 to match the actual implementation.

Suggested change
The `@object-ui/types` package defines **35 typed metadata interfaces** in
The `@object-ui/types` package defines **37 typed metadata interfaces** in

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants